* Step 1: DependencyPairs WORST_CASE(?,O(n^3)) + Considered Problem: - Strict TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(X1,X2) activate(n__terms(X)) -> terms(X) add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) first(X1,X2) -> n__first(X1,X2) first(0(),X) -> nil() first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) terms(N) -> cons(recip(sqr(N)),n__terms(s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {activate,add,dbl,first,sqr,terms} and constructors {0 ,cons,n__first,n__terms,nil,recip,s} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(0(),X) -> c_4() add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(0()) -> c_6() dbl#(s(X)) -> c_7(dbl#(X)) first#(X1,X2) -> c_8() first#(0(),X) -> c_9() first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(0()) -> c_11() sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_13(sqr#(N)) terms#(X) -> c_14() Weak DPs and mark the set of starting terms. * Step 2: UsableRules WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(0(),X) -> c_4() add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(0()) -> c_6() dbl#(s(X)) -> c_7(dbl#(X)) first#(X1,X2) -> c_8() first#(0(),X) -> c_9() first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(0()) -> c_11() sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_13(sqr#(N)) terms#(X) -> c_14() - Weak TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(X1,X2) activate(n__terms(X)) -> terms(X) add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) first(X1,X2) -> n__first(X1,X2) first(0(),X) -> nil() first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) terms(N) -> cons(recip(sqr(N)),n__terms(s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/3,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(0(),X) -> c_4() add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(0()) -> c_6() dbl#(s(X)) -> c_7(dbl#(X)) first#(X1,X2) -> c_8() first#(0(),X) -> c_9() first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(0()) -> c_11() sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_13(sqr#(N)) terms#(X) -> c_14() * Step 3: PredecessorEstimation WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(0(),X) -> c_4() add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(0()) -> c_6() dbl#(s(X)) -> c_7(dbl#(X)) first#(X1,X2) -> c_8() first#(0(),X) -> c_9() first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(0()) -> c_11() sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_13(sqr#(N)) terms#(X) -> c_14() - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/3,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,4,6,8,9,11,14} by application of Pre({1,4,6,8,9,11,14}) = {2,3,5,7,10,12,13}. Here rules are labelled as follows: 1: activate#(X) -> c_1() 2: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) 3: activate#(n__terms(X)) -> c_3(terms#(X)) 4: add#(0(),X) -> c_4() 5: add#(s(X),Y) -> c_5(add#(X,Y)) 6: dbl#(0()) -> c_6() 7: dbl#(s(X)) -> c_7(dbl#(X)) 8: first#(X1,X2) -> c_8() 9: first#(0(),X) -> c_9() 10: first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) 11: sqr#(0()) -> c_11() 12: sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) 13: terms#(N) -> c_13(sqr#(N)) 14: terms#(X) -> c_14() * Step 4: RemoveWeakSuffixes WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_13(sqr#(N)) - Weak DPs: activate#(X) -> c_1() add#(0(),X) -> c_4() dbl#(0()) -> c_6() first#(X1,X2) -> c_8() first#(0(),X) -> c_9() sqr#(0()) -> c_11() terms#(X) -> c_14() - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/3,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) -->_1 first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)):5 -->_1 first#(0(),X) -> c_9():12 -->_1 first#(X1,X2) -> c_8():11 2:S:activate#(n__terms(X)) -> c_3(terms#(X)) -->_1 terms#(N) -> c_13(sqr#(N)):7 -->_1 terms#(X) -> c_14():14 3:S:add#(s(X),Y) -> c_5(add#(X,Y)) -->_1 add#(0(),X) -> c_4():9 -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):3 4:S:dbl#(s(X)) -> c_7(dbl#(X)) -->_1 dbl#(0()) -> c_6():10 -->_1 dbl#(s(X)) -> c_7(dbl#(X)):4 5:S:first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) -->_1 activate#(X) -> c_1():8 -->_1 activate#(n__terms(X)) -> c_3(terms#(X)):2 -->_1 activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)):1 6:S:sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) -->_2 sqr#(0()) -> c_11():13 -->_3 dbl#(0()) -> c_6():10 -->_1 add#(0(),X) -> c_4():9 -->_2 sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)):6 -->_3 dbl#(s(X)) -> c_7(dbl#(X)):4 -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):3 7:S:terms#(N) -> c_13(sqr#(N)) -->_1 sqr#(0()) -> c_11():13 -->_1 sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)):6 8:W:activate#(X) -> c_1() 9:W:add#(0(),X) -> c_4() 10:W:dbl#(0()) -> c_6() 11:W:first#(X1,X2) -> c_8() 12:W:first#(0(),X) -> c_9() 13:W:sqr#(0()) -> c_11() 14:W:terms#(X) -> c_14() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 11: first#(X1,X2) -> c_8() 12: first#(0(),X) -> c_9() 14: terms#(X) -> c_14() 9: add#(0(),X) -> c_4() 10: dbl#(0()) -> c_6() 13: sqr#(0()) -> c_11() 8: activate#(X) -> c_1() * Step 5: PredecessorEstimationCP WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_13(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/3,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) 4: dbl#(s(X)) -> c_7(dbl#(X)) 7: terms#(N) -> c_13(sqr#(N)) Consider the set of all dependency pairs 1: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) 2: activate#(n__terms(X)) -> c_3(terms#(X)) 3: add#(s(X),Y) -> c_5(add#(X,Y)) 4: dbl#(s(X)) -> c_7(dbl#(X)) 5: first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) 6: sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) 7: terms#(N) -> c_13(sqr#(N)) Processor NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^2)) SPACE(?,?)on application of the dependency pairs {1,4,7} These cover all (indirect) predecessors of dependency pairs {1,2,4,5,7} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. ** Step 5.a:1: NaturalMI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_13(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/3,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation (containing no more than 2 non-zero interpretation-entries in the diagonal of the component-wise maxima): The following argument positions are considered usable: uargs(c_2) = {1}, uargs(c_3) = {1}, uargs(c_5) = {1}, uargs(c_7) = {1}, uargs(c_10) = {1}, uargs(c_12) = {1,2,3}, uargs(c_13) = {1} Following symbols are considered usable: {activate#,add#,dbl#,first#,sqr#,terms#} TcT has computed the following interpretation: p(0) = [0] [0] [1] p(activate) = [0] [0] [0] p(add) = [1 1 0] [0] [0 0 0] x1 + [0] [0 0 1] [1] p(cons) = [0 0 0] [1] [0 1 1] x2 + [1] [0 0 0] [0] p(dbl) = [0 0 1] [1] [0 0 0] x1 + [0] [0 0 0] [1] p(first) = [0] [0] [0] p(n__first) = [0 1 0] [0 0 0] [0] [0 0 1] x1 + [0 1 0] x2 + [1] [0 0 0] [0 0 0] [1] p(n__terms) = [0 0 0] [0] [0 1 0] x1 + [1] [0 0 0] [1] p(nil) = [0] [0] [0] p(recip) = [0] [0] [0] p(s) = [0 0 0] [0] [0 1 1] x1 + [0] [0 0 1] [1] p(sqr) = [1 0 0] [0] [1 0 0] x1 + [0] [0 0 1] [1] p(terms) = [0] [0] [0] p(activate#) = [0 1 0] [1] [0 0 1] x1 + [0] [1 0 1] [1] p(add#) = [0] [1] [0] p(dbl#) = [0 0 1] [0] [0 1 1] x1 + [0] [0 0 1] [1] p(first#) = [0 1 0] [0] [0 0 0] x2 + [1] [1 0 0] [0] p(sqr#) = [0 1 0] [0] [0 0 1] x1 + [1] [0 0 0] [1] p(terms#) = [0 1 0] [1] [0 0 0] x1 + [1] [0 0 0] [1] p(c_1) = [0] [0] [0] p(c_2) = [1 1 0] [0] [0 0 0] x1 + [0] [0 0 0] [0] p(c_3) = [1 1 0] [0] [0 0 1] x1 + [0] [0 1 0] [1] p(c_4) = [0] [0] [0] p(c_5) = [1 0 0] [0] [0 1 0] x1 + [0] [0 0 0] [0] p(c_6) = [0] [0] [0] p(c_7) = [1 0 0] [0] [0 1 0] x1 + [1] [0 0 0] [1] p(c_8) = [0] [0] [0] p(c_9) = [0] [0] [0] p(c_10) = [1 1 0] [0] [0 0 0] x1 + [0] [0 0 0] [1] p(c_11) = [0] [0] [0] p(c_12) = [1 0 0] [1 0 0] [1 0 0] [0] [0 0 0] x1 + [0 0 0] x2 + [0 0 1] x3 + [1] [0 0 0] [0 0 1] [0 0 0] [0] p(c_13) = [1 0 0] [0] [0 0 0] x1 + [1] [0 0 0] [0] p(c_14) = [0] [0] [0] Following rules are strictly oriented: activate#(n__first(X1,X2)) = [0 0 1] [0 1 0] [2] [0 0 0] X1 + [0 0 0] X2 + [1] [0 1 0] [0 0 0] [2] > [0 1 0] [1] [0 0 0] X2 + [0] [0 0 0] [0] = c_2(first#(X1,X2)) dbl#(s(X)) = [0 0 1] [1] [0 1 2] X + [1] [0 0 1] [2] > [0 0 1] [0] [0 1 1] X + [1] [0 0 0] [1] = c_7(dbl#(X)) terms#(N) = [0 1 0] [1] [0 0 0] N + [1] [0 0 0] [1] > [0 1 0] [0] [0 0 0] N + [1] [0 0 0] [0] = c_13(sqr#(N)) Following rules are (at-least) weakly oriented: activate#(n__terms(X)) = [0 1 0] [2] [0 0 0] X + [1] [0 0 0] [2] >= [0 1 0] [2] [0 0 0] X + [1] [0 0 0] [2] = c_3(terms#(X)) add#(s(X),Y) = [0] [1] [0] >= [0] [1] [0] = c_5(add#(X,Y)) first#(s(X),cons(Y,Z)) = [0 1 1] [1] [0 0 0] Z + [1] [0 0 0] [1] >= [0 1 1] [1] [0 0 0] Z + [0] [0 0 0] [1] = c_10(activate#(Z)) sqr#(s(X)) = [0 1 1] [0] [0 0 1] X + [2] [0 0 0] [1] >= [0 1 1] [0] [0 0 1] X + [2] [0 0 0] [1] = c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) ** Step 5.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: activate#(n__terms(X)) -> c_3(terms#(X)) add#(s(X),Y) -> c_5(add#(X,Y)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) dbl#(s(X)) -> c_7(dbl#(X)) terms#(N) -> c_13(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/3,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ** Step 5.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: add#(s(X),Y) -> c_5(add#(X,Y)) sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) dbl#(s(X)) -> c_7(dbl#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) terms#(N) -> c_13(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/3,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:add#(s(X),Y) -> c_5(add#(X,Y)) -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):1 2:S:sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) -->_3 dbl#(s(X)) -> c_7(dbl#(X)):5 -->_2 sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)):2 -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):1 3:W:activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) -->_1 first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)):6 4:W:activate#(n__terms(X)) -> c_3(terms#(X)) -->_1 terms#(N) -> c_13(sqr#(N)):7 5:W:dbl#(s(X)) -> c_7(dbl#(X)) -->_1 dbl#(s(X)) -> c_7(dbl#(X)):5 6:W:first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) -->_1 activate#(n__terms(X)) -> c_3(terms#(X)):4 -->_1 activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)):3 7:W:terms#(N) -> c_13(sqr#(N)) -->_1 sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 5: dbl#(s(X)) -> c_7(dbl#(X)) ** Step 5.b:2: SimplifyRHS WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: add#(s(X),Y) -> c_5(add#(X,Y)) sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) terms#(N) -> c_13(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/3,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:add#(s(X),Y) -> c_5(add#(X,Y)) -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):1 2:S:sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) -->_2 sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)):2 -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):1 3:W:activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) -->_1 first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)):6 4:W:activate#(n__terms(X)) -> c_3(terms#(X)) -->_1 terms#(N) -> c_13(sqr#(N)):7 6:W:first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) -->_1 activate#(n__terms(X)) -> c_3(terms#(X)):4 -->_1 activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)):3 7:W:terms#(N) -> c_13(sqr#(N)) -->_1 sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)):2 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)) ** Step 5.b:3: DecomposeDG WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: add#(s(X),Y) -> c_5(add#(X,Y)) sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)) - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) terms#(N) -> c_13(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Just someStrategy, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)) terms#(N) -> c_13(sqr#(N)) and a lower component add#(s(X),Y) -> c_5(add#(X,Y)) Further, following extension rules are added to the lower component. activate#(n__first(X1,X2)) -> first#(X1,X2) activate#(n__terms(X)) -> terms#(X) first#(s(X),cons(Y,Z)) -> activate#(Z) sqr#(s(X)) -> add#(sqr(X),dbl(X)) sqr#(s(X)) -> sqr#(X) terms#(N) -> sqr#(N) *** Step 5.b:3.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)) - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) terms#(N) -> c_13(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)) The strictly oriented rules are moved into the weak component. **** Step 5.b:3.a:1.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)) - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) terms#(N) -> c_13(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_2) = {1}, uargs(c_3) = {1}, uargs(c_10) = {1}, uargs(c_12) = {1,2}, uargs(c_13) = {1} Following symbols are considered usable: {activate#,add#,dbl#,first#,sqr#,terms#} TcT has computed the following interpretation: p(0) = [4] p(activate) = [2] x1 + [0] p(add) = [1] x1 + [12] p(cons) = [1] x1 + [1] x2 + [0] p(dbl) = [2] p(first) = [0] p(n__first) = [1] x2 + [1] p(n__terms) = [1] x1 + [0] p(nil) = [0] p(recip) = [1] p(s) = [1] x1 + [8] p(sqr) = [2] x1 + [10] p(terms) = [0] p(activate#) = [8] x1 + [9] p(add#) = [0] p(dbl#) = [0] p(first#) = [8] x2 + [9] p(sqr#) = [1] x1 + [9] p(terms#) = [1] x1 + [9] p(c_1) = [0] p(c_2) = [1] x1 + [8] p(c_3) = [1] x1 + [0] p(c_4) = [0] p(c_5) = [0] p(c_6) = [0] p(c_7) = [2] x1 + [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [2] p(c_12) = [1] x1 + [1] x2 + [0] p(c_13) = [1] x1 + [0] p(c_14) = [0] Following rules are strictly oriented: sqr#(s(X)) = [1] X + [17] > [1] X + [9] = c_12(add#(sqr(X),dbl(X)),sqr#(X)) Following rules are (at-least) weakly oriented: activate#(n__first(X1,X2)) = [8] X2 + [17] >= [8] X2 + [17] = c_2(first#(X1,X2)) activate#(n__terms(X)) = [8] X + [9] >= [1] X + [9] = c_3(terms#(X)) first#(s(X),cons(Y,Z)) = [8] Y + [8] Z + [9] >= [8] Z + [9] = c_10(activate#(Z)) terms#(N) = [1] N + [9] >= [1] N + [9] = c_13(sqr#(N)) **** Step 5.b:3.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)) terms#(N) -> c_13(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 5.b:3.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)) terms#(N) -> c_13(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) -->_1 first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)):3 2:W:activate#(n__terms(X)) -> c_3(terms#(X)) -->_1 terms#(N) -> c_13(sqr#(N)):5 3:W:first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) -->_1 activate#(n__terms(X)) -> c_3(terms#(X)):2 -->_1 activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)):1 4:W:sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)) -->_2 sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)):4 5:W:terms#(N) -> c_13(sqr#(N)) -->_1 sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)):4 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) 3: first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) 2: activate#(n__terms(X)) -> c_3(terms#(X)) 5: terms#(N) -> c_13(sqr#(N)) 4: sqr#(s(X)) -> c_12(add#(sqr(X),dbl(X)),sqr#(X)) **** Step 5.b:3.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 5.b:3.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: add#(s(X),Y) -> c_5(add#(X,Y)) - Weak DPs: activate#(n__first(X1,X2)) -> first#(X1,X2) activate#(n__terms(X)) -> terms#(X) first#(s(X),cons(Y,Z)) -> activate#(Z) sqr#(s(X)) -> add#(sqr(X),dbl(X)) sqr#(s(X)) -> sqr#(X) terms#(N) -> sqr#(N) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: add#(s(X),Y) -> c_5(add#(X,Y)) The strictly oriented rules are moved into the weak component. **** Step 5.b:3.b:1.a:1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: add#(s(X),Y) -> c_5(add#(X,Y)) - Weak DPs: activate#(n__first(X1,X2)) -> first#(X1,X2) activate#(n__terms(X)) -> terms#(X) first#(s(X),cons(Y,Z)) -> activate#(Z) sqr#(s(X)) -> add#(sqr(X),dbl(X)) sqr#(s(X)) -> sqr#(X) terms#(N) -> sqr#(N) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_5) = {1} Following symbols are considered usable: {add,dbl,sqr,activate#,add#,dbl#,first#,sqr#,terms#} TcT has computed the following interpretation: p(0) = 0 p(activate) = 4 + 2*x1 + x1^2 p(add) = x1 + x2 p(cons) = 1 + x1 + x2 p(dbl) = 2*x1 p(first) = 4 + x2^2 p(n__first) = x1 + x2 p(n__terms) = x1 p(nil) = 0 p(recip) = 0 p(s) = 1 + x1 p(sqr) = 2 + x1^2 p(terms) = x1^2 p(activate#) = 3 + 5*x1 + 4*x1^2 p(add#) = x1 + x2 p(dbl#) = 2 + x1^2 p(first#) = x1*x2 + x1^2 + 4*x2^2 p(sqr#) = 2*x1^2 p(terms#) = 1 + 4*x1^2 p(c_1) = 0 p(c_2) = x1 p(c_3) = 1 + x1 p(c_4) = 0 p(c_5) = x1 p(c_6) = 0 p(c_7) = 1 p(c_8) = 0 p(c_9) = 0 p(c_10) = 1 + x1 p(c_11) = 1 p(c_12) = 1 p(c_13) = 1 p(c_14) = 0 Following rules are strictly oriented: add#(s(X),Y) = 1 + X + Y > X + Y = c_5(add#(X,Y)) Following rules are (at-least) weakly oriented: activate#(n__first(X1,X2)) = 3 + 5*X1 + 8*X1*X2 + 4*X1^2 + 5*X2 + 4*X2^2 >= X1*X2 + X1^2 + 4*X2^2 = first#(X1,X2) activate#(n__terms(X)) = 3 + 5*X + 4*X^2 >= 1 + 4*X^2 = terms#(X) first#(s(X),cons(Y,Z)) = 6 + 3*X + X*Y + X*Z + X^2 + 9*Y + 8*Y*Z + 4*Y^2 + 9*Z + 4*Z^2 >= 3 + 5*Z + 4*Z^2 = activate#(Z) sqr#(s(X)) = 2 + 4*X + 2*X^2 >= 2 + 2*X + X^2 = add#(sqr(X),dbl(X)) sqr#(s(X)) = 2 + 4*X + 2*X^2 >= 2*X^2 = sqr#(X) terms#(N) = 1 + 4*N^2 >= 2*N^2 = sqr#(N) add(0(),X) = X >= X = X add(s(X),Y) = 1 + X + Y >= 1 + X + Y = s(add(X,Y)) dbl(0()) = 0 >= 0 = 0() dbl(s(X)) = 2 + 2*X >= 2 + 2*X = s(s(dbl(X))) sqr(0()) = 2 >= 0 = 0() sqr(s(X)) = 3 + 2*X + X^2 >= 3 + 2*X + X^2 = s(add(sqr(X),dbl(X))) **** Step 5.b:3.b:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: activate#(n__first(X1,X2)) -> first#(X1,X2) activate#(n__terms(X)) -> terms#(X) add#(s(X),Y) -> c_5(add#(X,Y)) first#(s(X),cons(Y,Z)) -> activate#(Z) sqr#(s(X)) -> add#(sqr(X),dbl(X)) sqr#(s(X)) -> sqr#(X) terms#(N) -> sqr#(N) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 5.b:3.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: activate#(n__first(X1,X2)) -> first#(X1,X2) activate#(n__terms(X)) -> terms#(X) add#(s(X),Y) -> c_5(add#(X,Y)) first#(s(X),cons(Y,Z)) -> activate#(Z) sqr#(s(X)) -> add#(sqr(X),dbl(X)) sqr#(s(X)) -> sqr#(X) terms#(N) -> sqr#(N) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:activate#(n__first(X1,X2)) -> first#(X1,X2) -->_1 first#(s(X),cons(Y,Z)) -> activate#(Z):4 2:W:activate#(n__terms(X)) -> terms#(X) -->_1 terms#(N) -> sqr#(N):7 3:W:add#(s(X),Y) -> c_5(add#(X,Y)) -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):3 4:W:first#(s(X),cons(Y,Z)) -> activate#(Z) -->_1 activate#(n__terms(X)) -> terms#(X):2 -->_1 activate#(n__first(X1,X2)) -> first#(X1,X2):1 5:W:sqr#(s(X)) -> add#(sqr(X),dbl(X)) -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):3 6:W:sqr#(s(X)) -> sqr#(X) -->_1 sqr#(s(X)) -> sqr#(X):6 -->_1 sqr#(s(X)) -> add#(sqr(X),dbl(X)):5 7:W:terms#(N) -> sqr#(N) -->_1 sqr#(s(X)) -> sqr#(X):6 -->_1 sqr#(s(X)) -> add#(sqr(X),dbl(X)):5 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: activate#(n__first(X1,X2)) -> first#(X1,X2) 4: first#(s(X),cons(Y,Z)) -> activate#(Z) 2: activate#(n__terms(X)) -> terms#(X) 7: terms#(N) -> sqr#(N) 6: sqr#(s(X)) -> sqr#(X) 5: sqr#(s(X)) -> add#(sqr(X),dbl(X)) 3: add#(s(X),Y) -> c_5(add#(X,Y)) **** Step 5.b:3.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,sqr#/1,terms#/1} / {0/0 ,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1,c_8/0,c_9/0,c_10/1 ,c_11/0,c_12/2,c_13/1,c_14/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^3))